package com.neighbor.neighborhoodadmin.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.neighbor.neighborhoodadmin.pojo.MallOrders;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.sql.Wrapper;
import java.util.List;

/**
 * <p>
 * 商城兑换订单表 Mapper 接口
 * </p>
 *
 * @author song
 * @since 2025-09-22 09:11:23
 */

/**
 * start 从第几条开始
 * limit 每页数量
 * keyword 关键字
 * status 状态
 */
public interface IMallOrdersDao extends BaseMapper<MallOrders> {
        //管理员获取物品订单
        List<MallOrders> orders(@RequestParam("start") Integer start,
                                @RequestParam("limit") Integer limit,
                                @RequestParam("keyword") String keyword,
                                @RequestParam("status") Integer status);
        //管理员修改订单状态
        Integer updateStatusById(@Param("id") Integer id,
                                 @Param("status") Integer status);
        //获取符合条件的总条数
        Integer countOrders(@RequestParam("keyword") String keyword,
                            @RequestParam("status") Integer status);
}
